package com.linkallcloud.core.enums;

public enum Agree implements EnumBase<Integer> {

    Yes(1, "同意"), No(2, "不同意");

    private int code;
    private String message;

    Agree(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public static Agree get(Integer code) {
        for (Agree ul : values()) {
            if (ul.getCode().equals(code)) {
                return ul;
            }
        }
        return null;
    }

}
